<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
	<title>txtSQL Documentation</title>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
	<link rel="stylesheet" type="text/css" href="./includes/style.css" />
	<script src="./includes/javascript.js"></script>
</head>
<body>

<table width="96%" cellspacing="0" cellpadding="9" border="0" align="center" class="mainTable">
	<tr>
		<td class="header" colspan="2">
			<table cellspacing="0" cellpadding="0" border="0" width="100%">
				<tr>
					<td align="left">
						<a href="index.html">Home</a>
						&nbsp; &nbsp;<a href="javascript:history.back()">Back</a>
						&nbsp; &nbsp;<a href="javascript:history.forward()">Forward</a>
						&nbsp; &nbsp;<a href="javascript:location.reload()">Refresh</a>
						&nbsp; &nbsp;<a href="http://chibiguy.dotgeek.org/index.php">txtSQL Homepage</a>
					</td>
					<td align="right">
						<a href="http://chibiguy.dotgeek.org/index.php" target="_blank"><img src="includes/txtsql_powered_small.gif" /></a>
					</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr valign="top">
		<td class="mainCell">
			<div class="dashedUnderline"><a href="index.html">txtSQL Documentation</a> > <a  href="1.html">'Language Reference'</a> > Column Types</div><br />

			<table width="100%">
				<tr valign="bottom">
					<td align="left">
						<div class="h1">Column Types </div>
					</td>
					<td align="right">
											</td>
				</tr>
			</table>

			<br />			<div class="content">
				When creating a table, there are multiple column types that you can choose from to customize that
column. They can be any one of the following or more.<br /><br />


<table width="100%" cellspacing="1" cellpadding="3" border="0" bgcolor="BBBBBB">
    <tr bgcolor="fafafa" align="center">
        <td><b>Name</b></td>
        <td><b>Example</b></td>
        <td><b>Description</b></td>
    </tr>

    <tr bgcolor="fefefe">
        <td>auto_increment</td>
        <td>array('auto_increment' => [0|1])</td>
        <td>This columns increments itself automatically when inserting. This column must be of type
            'int'.</td>
    </tr>

    <tr bgcolor="fefefe">
        <td>max</td>
        <td>array('max' => $maxLength)</td>
        <td>This column type limits the length of the field to $maxLength. If the column is of type
            integer, then the value will be checked against rather than the length</td>
    </tr>

    <tr bgcolor="fefefe">
        <td>permanent</td>
        <td>array('permanent' => [0|1])</td>
        <td>This column type, when set to 1, does not allow it to be editable until set to 1 again</td>
    </tr>

    <tr bgcolor="fefefe">
        <td>type</td>
        <td>array('type' => [string|text|int|bool|date|enum])</td>
        <td>see the <a  href="4.html">data types</a> section</td>
    </tr>

    <tr bgcolor="fefefe">
        <td>enum_val</td>
        <td>array('enum_val' => array([$values]...))</td>
        <td>This column type is only required when the column's type is set to enum. This is the list of
            possible values in the column. The default value is always the trailing value. If the value
            doesn't match any one of the enum_val's, then it will be replaced with the default value.</td>
    </tr>

    <tr bgcolor="fefefe">
        <td>default</td>
        <td>array('default' => $defaultValue)</td>
        <td>This type allows txtSQL to know what the default value for a column is. txtSQL will use this value only when there
            is no value for a column given to insert</td>
    </tr>

    <tr bgcolor="fefefe">
        <td>primary</td>
        <td>array('primary' => [0|1])</td>
        <td>Tells txtSQL that this column is the primary column, when set to 1. There can only be one per table, and it must be
            of type 'int' and has to be 'auto_increment'</td>
    </tr>
</table>			</div><br /><br />

			
			
			<TEXTAREA ID="holdtext" STYLE="display: none;"></TEXTAREA>			
			<table class="commentTable">
				<tr>
					<td style="border: 0px solid; margin: 0px; padding: 0px;">
						<table width="100%">
							<tr>
								<td style="border:0px solid;">
									<div class="h1">User Comments - Column Types</div>
								</td>
								<td align="right" style="border: 0px solid; padding: 0px; margin: 0px;">
									
								</td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td class="row1" align="center">
						No comments posted yet; 
					</td>
				</tr>
			</table>
		</td>

		<td class="sideCell">
		
			<table width="100%" cellspacing="0" cellpadding="0" border="0" class="dashedUnderline">
				<tr>
					<td align="left">
						<a  href="4.html">Last Page</a>					</td>
					<td align="right">
						<a  href="6.html">Next Page</a>					</td>
				</tr>
			</table><br />

			
			<a style="font-weight: bold;"  href="1.html">'Language Reference'</a></b><br />
			<li /> <a  href="2.html">Logical Operators</a><br />
			<li /> <a  href="3.html">Relational Operators</a><br />
			<li /> <a  href="4.html">Data Types</a><br />
			<li /> <i>Column Types</i><br />
			<li /> <a  href="6.html">Primary Keys</a><br />
			<li /> <a  href="7.html">Functions</a><br />
			<li /> <a  href="8.html">Where Clauses</a><br />
			<li /> <a  href="9.html">LIKE Clauses</a><br />
			<li /> <a  href="10.html">Limit Clauses</a><br />
			<li /> <a  href="11.html">OrderBy Clauses</a><br />
			<li /> <a  href="12.html">Notes</a><br />
			<li /> <a  href="75.html">txtSQL 3.0.0 Beta Readme</a><br />
			<br />

			<a style="font-weight: bold;"  href="13.html">User Functions</a></b><br />
			<br />

			<a style="font-weight: bold;"  href="19.html">Database Functions</a></b><br />
			<br />

			<a style="font-weight: bold;"  href="28.html">Data Manipulation Functions</a></b><br />
			<br />

			<a style="font-weight: bold;"  href="34.html">Table Functions</a></b><br />
			<br />

			<a style="font-weight: bold;"  href="42.html">Error Handling Functions</a></b><br />
			<br />

			<a style="font-weight: bold;"  href="52.html">SQL Syntax</a></b><br />
			<br />

		</td>
	</tr>
	<tr>
		<td colspan="2" class="notices" align="center">
			[ txtSQL Documentation powered by <a href="http://chibiguy.dotgeek.org" target="_blank">txtSQL</a> | 6 SQL Queries ]
		</td>
	</tr>
</table>

</body>
</html>